package com.shyroke.service.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shyroke.entity.DaiShenHe;
import com.shyroke.mapper.DaiShenHeMapper;
import com.shyroke.service.DaiShenHeServiceI;

@Service
public class DaiShenHeServiceImpl implements DaiShenHeServiceI {

	@Autowired
	private DaiShenHeMapper daishenheMapper;
	
	@Override
	public void insert(Integer articleId) {
		DaiShenHe record=new DaiShenHe();
		record.setArticleid(articleId);
		daishenheMapper.insert(record);
	}

	@Override
	public boolean isExist(Integer articleId) {
		
		DaiShenHe daishenhe=daishenheMapper.isExist(articleId);
		
		if(daishenhe!=null) {
			return true;
		}else {
			return false;
		}
		
		
	}

}
